package com.tl.boot.common.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * com.tl.boot.config -- PermissionParamConfig
 * Description:
 * Created by joshua_liu <a href="mailto:joshualwork@163.com"></a>
 * On 2019/9/12 15:12
 */
@Component
@ConfigurationProperties(prefix = "permissionParams")
public class PermissionParamConfig {
    private String salt;
    private Long validHours;
    public Long getValidTime() {
        return TimeUnit.HOURS.toMillis(validHours);
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Long getValidHours() {
        return validHours;
    }

    public void setValidHours(Long validHours) {
        this.validHours = validHours;
    }

}
